home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FGL304E.ZIP;1 / EXPAS.ARJ / FGDOC / EXAMPLES / PASCAL / 14-08.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-01-24  |  1001 b   |  50 lines

  1. program main;
  2. uses fgmain, fgmisc;
  3.  
  4. var
  5.   old_mode       : integer;
  6.   buttons, count : integer;
  7.   x, y           : integer;
  8.   message        : string[25];
  9.   strx, stry     : string[4];
  10.   strcount       : string[5];
  11.  
  12. begin
  13.   old_mode := fg_getmode;
  14.   fg_setmode(fg_automode);
  15.  
  16.   if (fg_mouseini < 0) then
  17.   begin
  18.     fg_setmode(old_mode);
  19.     fg_reset;
  20.     exit;
  21.   end;
  22.  
  23.   fg_setcolor(15);
  24.   fg_rect(0,fg_getmaxx,0,fg_getmaxy);
  25.   fg_mousevis(1);
  26.  
  27.   repeat
  28.   begin
  29.     fg_waitfor(54);
  30.     fg_mousebut(1,count,x,y);
  31.     fg_mousepos(x,y,buttons);
  32.     str(x:3,strx);
  33.     str(y:3,stry);
  34.     str(count:4,strcount);
  35.     message := 'X=' + strx + '  Y=' + stry + '  count=' + strcount;
  36.     fg_mousevis(0);
  37.     fg_setcolor(15);
  38.     fg_rect(0,fg_xconvert(25),0,fg_yconvert(1));
  39.     fg_setcolor(0);
  40.     fg_locate(0,0);
  41.     fg_text(message,24);
  42.     fg_mousevis(1);
  43.     fg_mousebut(2,count,x,y);
  44.   end;
  45.   until (count > 0);
  46.  
  47.   fg_setmode(old_mode);
  48.   fg_reset;
  49. end.
  50.